package design_pattern.builder;

/**
 * Created by WeiDingKuo on 2017/10/26 15:25
 * <p>
 * 具体的建造方法
 */
public class BuildMan implements Builder {
    private Person person;

    public BuildMan(Person person) {
        this.person = person;
    }

    @Override
    public void buildHead() {
        this.person.setHead("男人的头");
    }

    @Override
    public void buildBody() {
        this.person.setBody("男人的身体");
    }

    @Override
    public void buildHand() {
        this.person.setHand("男人的手");
    }

    @Override
    public void buildFoot() {
        this.person.setFoot("男人的脚");
    }

    @Override
    public Person buildPerson() {
        return this.person;
    }
}
